# Maintainer: Brandon Boese <brandonboese@protonmail.com>
pkgname=lomiri-filemanager-app
pkgver=1.0.4
pkgrel=0
pkgdesc="A convergent file manager supporting both mobile devices and desktops"
url="https://gitlab.com/ubports/development/apps/lomiri-filemanager-app"
arch="all !armhf" # blocked by lomiri-ui-toolkit
license="GPL-3.0-only"
source="https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/archive/v$pkgver/lomiri-filemanager-app-v$pkgver.tar.gz
	0001-include-paths.h.patch
	0002-link-libintl.patch
	"
depends="
	lomiri-content-hub
	lomiri-thumbnailer
	lomiri-ui-extras
	lomiri-ui-toolkit
	qqc2-suru-style
	samba
	suru-icon-theme
	"
makedepends="
	click-dev
	cmake
	cmake-extras
	libsmbclient
	lomiri-trust-store-dev
	musl-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samba-dev
	samurai
	"
checkdepends="
	py3-dbusmock
	py3-xdg
	xvfb-run
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # requires autopilot
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=None \
		-DCLICK_MODE=OFF \
		-DINSTALL_TESTS=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a22b3d952779569d0cf9f23a86b876b1024301d5a40ff8b30e4076bc60868e50a09447e7c2212902f58e18a0e67b6fab508244050a8f8560beffe6d2e2d53263  lomiri-filemanager-app-v1.0.4.tar.gz
b3abc5dfb4b7d6ed9923b3819bebb42316d9d7fb383d60ae36c6d523c6b49d0b8aeec20bc13fe45887cfa5254fb51ad366b86891d0611dcabe15e44faedbe8bd  0001-include-paths.h.patch
8a129769115f4c4381c771ad38b8a02071ba11fa686d4337e707272c0fb62536973784980df0df42052b051e6d532697e3b592bd48e033ade5467f9a3f624107  0002-link-libintl.patch
"
